<script>
    $(function () {
        var form = new Vue({
            el:'#form',
            data:{
                service_area_ids:window.service_area_ids,
                districtCouple:window.districtCouple,
            },
            mounted:function(){
                for (i in this.service_area_ids){
                    var checkbox = $('input:checkbox#checkbox_'+service_area_ids[i]);
                    checkbox.attr('checked','checked');
                }
            },
            methods:{
            }
        });

        var validator = $("#form").validate({
            rules: {
                'service_area_ids[]':{
                    required:true
                },
            },
            messages: {
                'service_area_ids[]':{
                    required:'请选择服务区域'
                },
            },
            submitHandler: function(form) {
                form.submit();
            },
        });
    });
</script>
<style>
    li.checkbox02{
        height:auto;
    }
    li div.checkbox01{
        background: none;
        width:100%;
        margin:0px;
        padding:0px;
    }
    li div.checkbox01 span{
        border:none;
        width:30%;
        padding:0 10px;
    }
</style>